<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>后台订单管理</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/aaa.css">
<script src="${pageContext.request.contextPath}/js/jquery-3.1.0.min.js"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
<style type="text/css"></style>
</head>

<body>
<img calss="img-responsive" width="100%" src="${pageContext.request.contextPath}/image/head.jpg" />
<div class="container-fluid">
  <div class="row">
    <div class="span12">
      <nav class="navbar navbar-inverse" role="navigation">
        <div class="container-fluid"> 
          <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
            <a class="navbar-brand" href="#">后台管理</a> </div>
          
          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
              <li class="active"><a href="#">订单管理</a></li>
              <li><a href="${ pageContext.request.contextPath }/adminExpress_findAllFromAddr.action">今日揽件路径规划</a></li>
              <li><a href="${ pageContext.request.contextPath }/adminExpress_findAllToAddr.action">今日派送路径规划</a></li>
              <li><a href="${ pageContext.request.contextPath }/adminPort_findAll.action">车场管理</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
              <li><a href="${ pageContext.request.contextPath }/adminLogin_loginOut.action">注销</a></li>
              <li>
                <h4><span class="label label-success"><%=new Date().toLocaleString() %></span></h4>
              </li>
            </ul>
          </div>
          <!-- /.navbar-collapse --> 
        </div>
        <!-- /.container-fluid --> 
      </nav>
      <div class="panel panel-success">
        <div class="panel-heading">
          <form class="navbar-form navbar-left" role="search" id="searchForm" method="get" action="${ pageContext.request.contextPath }/adminExpress_findByPageId.action">
            <div class="form-group">
              <input type="text" class="form-control" placeholder="按订单号查找" id="expressId" name="expressId">
            </div>
            <button type="submit" class="btn btn-default">搜索</button>
          </form>
          <ul class="nav navbar-nav navbar-right">
            <li><a href="${ pageContext.request.contextPath }/index.action">
              <h4><span class="label label-success">添加订单</span></h4>
              </a></li>
          </ul>
          <br>
          <br>
        </div>
        <iframe id="tmp_downloadhelper_iframe" style="display: none;"></iframe>
      </div>
      <div class="panel-body">
        <div class="accordion" id="accordion-449551">
          <table class="table table-hover table-condensed">
            <tbody>
            <s:iterator var="e" value="pageBean.list">
              <tr>
                <td><div class="accordion-group">
                    <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-449551" href="#accordion-element-<s:property value="#e.expressId"/>">订单号：<s:property value="#e.expressId"/></a> </div>
                    <div id="accordion-element-<s:property value="#e.expressId"/>" class="accordion-body collapse">
                      <div class="accordion-inner">
                        <div class="col-md-12">
                          <div class="col-md-6">
                            <div class="col-md-4"><span class="label label-info">寄件人姓名</span><br/>
                              <s:property value="#e.sender"/><br/>
                              <br/>
                            </div>
                            <div class="col-md-4"><span class="label label-info">寄件人手机号码</span><br/>
                               <s:property value="#e.senderTel"/><br/>
                              <br/>
                            </div>
                            <div class="col-md-4"><span class="label label-info">寄件位置经纬度</span><br/>
                               <s:property value="#e.fromLNG"/>, <s:property value="#e.fromLAT"/><br/>
                              <br/>
                            </div>
                            <div class="col-md-12"><br/>
                              <span class="label label-info">寄件人详细地址</span> <s:property value="#e.fromAddr"/> <br/>
                              <br/>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="col-md-4"><span class="label label-info">收件人姓名</span><br/>
                               <s:property value="#e.reciever"/> <br/>
                              <br/>
                            </div>
                            <div class="col-md-4"><span class="label label-info">收件人手机号码</span><br/>
                              <s:property value="#e.recieverTel"/> <br/>
                              <br/>
                            </div>
                            <div class="col-md-4"><span class="label label-info">收件位置经纬度</span><br/>
                              <s:property value="#e.toLNG"/>,<s:property value="#e.toLAT"/><br/>
                              <br/>
                            </div>
                            <div class="col-md-12"><br/>
                              <span class="label label-info">收件人详细地址</span><s:property value="#e.toAddr"/> <br/>
                              <br/>
                            </div>
                          </div>
                          <div class="col-md-12">
                            <div class="col-xs-3 col-md-3"><span class="label label-info">订单日期</span><s:property value="#e.date"/><br/>
                              <br/>
                            </div>
                            <div class="col-xs-3 col-md-3"><span class="label label-info">订单状态</span>
                            <font color="red">
                            <s:if test="#e.status ==0">待揽件</s:if>
                            <s:if test="#e.status ==1">待派送</s:if>
                            <s:if test="#e.status ==2">已派送</s:if>
                            </font>
                            <br/>
                              <br/>
                            </div>
                            <div class="col-xs-3 col-md-3"><span class="label label-info">物件体积</span><s:property value="#e.volume"/> M<sup>3</sup><br/>
                              <br/>
                            </div>
                            <div class="col-xs-3 col-md-3"><span class="label label-info">物件重量</span><s:property value="#e.weight"/> KG<br/>
                              <br/>
                            </div>
                            <br/>
                            <div class="col-md-12"><span class="label label-info">备注</span><br/>
                            <s:property value="#e.rmark"/>
                              <br/>
                              <br/>
                            </div>
                            <div align="center">
                            	<s:if test="#e.status ==0"><a href="${ pageContext.request.contextPath }/adminExpress_updateState.action?expressId=<s:property value="#e.expressId"/>&status=0" class="btn btn-warning" >完成揽件</a></s:if>
                            	<s:if test="#e.status ==1"><a href="${ pageContext.request.contextPath }/adminExpress_updateState.action?expressId=<s:property value="#e.expressId"/>&status=0" class="btn btn-warning" >完成派件</a></s:if>
                              <a href="${ pageContext.request.contextPath }/adminExpress_deleteExpress.action?expressId=<s:property value="#e.expressId"/>" class="btn btn-danger">删除订单 </a>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <br/>
                    <br/>
                  </div></td>
              </tr>
              </s:iterator>
              
            </tbody>
          </table>
        </div>
        <br>
        <br>
      </div>
      <div class="">
      	<span>第<s:property value="pageBean.page" />/<s:property value="pageBean.totalPage" />页 </span>
        <div class="btn-toolbar" role="toolbar">
        <s:if test="pageBean.page!=1">
          <div class="btn-group" role="group">
            <a href="${ pageContext.request.contextPath }/adminExpress_findByPageAll.action?page=1" class="btn btn-primary">&lt;&lt; </a>
            <a href="${ pageContext.request.contextPath }/adminExpress_findByPageAll.action?page=<s:property value="pageBean.page-1"/>" class="btn btn-primary">&lt; </a>
          </div>
         </s:if>
          <div class="btn-group" role="group">
          <s:iterator var="i" begin="1" end="pageBean.totalPage">
          	<s:if test="pageBean.page!=#i"><a href="${ pageContext.request.contextPath }/adminExpress_findByPageAll.action?page=<s:property value="#i" />" class="btn btn-primary"><s:property value="#i"/></a></s:if>
          	<s:if test="pageBean.page==#i"><a href="${ pageContext.request.contextPath }/adminExpress_findByPageAll.action?page=<s:property value="#i" />" class="btn btn-primary active"><s:property value="#i"/></a></s:if>
           </s:iterator>
          </div>
          <s:if test="pageBean.page!=pageBean.totalPage">
          <div class="btn-group" role="group">
            <a href="${ pageContext.request.contextPath }/adminExpress_findByPageAll.action?page=<s:property value="pageBean.page+1"/>" class="btn btn-primary">&gt; </a>
            <a href="${ pageContext.request.contextPath }/adminExpress_findByPageAll.action?page=<s:property value="pageBean.totalPage"/>" class="btn btn-primary">&gt;&gt; </a>
          </div>
          </s:if>
        </div>
      </div>
    </div>
  </div>
</div>
</body>
</html>
